<?php 
	$users = include "./users.php";
	include "./login.class.php";


	foreach ($users as $key => $value) {
		if ($value['username']==$_POST['username']) {
			if ($value['password']==md5($_POST['password'])) {
				session_start();
				$_SESSION['username']=$value["username"];
				$_SESSION['nikename']=$value["nikename"];
				login('您已成功登录',3,'./index.php');
				exit;
			}
		}
	}
	

cuowu('账号或密码存在错误，请重试！',3,'./index.php');




 ?>